Mathematical expressions
can be used in the following ways...
6
This mathematical expression
simply evaluates to the number 6.
-6
This is an example of
what is called 'unary minus'. It is used to represent negative
numbers.
10+5 ' This evaluates to 15
10-5 '
This evaluates to 5
10*5 '
This evaluates to 50
10/5 '
This evaluates to 2
5^3 '
This evaluates to 125 (5x5x5)
Mathematical expressions
can also be combined easily...
10*5-5/5 ' This evaluates
to 49
Brackets can also be used
to specify the order in which the calculation should be performed...
(10*5-5)/5 ' This evaluates
to 9
The answer is different
due to the part in brackets being done before everything else.